
<ol class="breadcrumb">
    <li class="active">Home</li>
</ol>

<div class="panel panel-default">
    <div class="panel-heading">
        <h3>分类 -
        <button class="btn btn-xs btn-info" ng-click="show_edit = !show_edit">{{!show_edit?'编辑分类':'关闭编辑'}}</button>
        </h3>
    </div>
    <div class="panel-body">

        <ul class="media-list">
            <li class="media" ng-repeat="item in list">
                <a class="pull-left" href="#/api/{{item.href}}">
                    <img class="media-object" ng-src="img/{{$index % 6}}.jpg" alt="...">
                </a>
                <div class="media-body">
                    <h4 class="media-heading">
                        <a href="#/api/{{item.href}}" title="{{item.description}}">{{item.name}}</a>
                        <small title="当前分类的主键"> - {{item.href}}</small>
                        <button ng-show="show_edit" ng-click="remove(item)" class="btn btn-danger btn-xs pull-right">删除</button>
                        <a ng-show="show_edit" class="btn btn-info btn-xs pull-right" href="#/add/{{item.href}}" style="margin-right: 5px;">编辑</a>

                    </h4>
                    <p>{{item.description}}</p>
                </div>
            </li>
        </ul>


    </div>
    <div class="panel-footer">
        <a class="btn btn-default" href="#/add">新建分类</a>
    </div>
    </div>


